<script setup>
const emit = defineEmits(["add", "remove"]);

const props = defineProps({
  title: "",
});
</script>

<template>
  <div class="box">
    <div class="title">{{ props.title }}</div>
    <div class="flex">
      <el-tooltip
        class="box-item"
        effect="dark"
        content="添加"
        placement="top-start"
      >
        <el-icon style="cursor: pointer" @click.stop="emit('add')"
          ><Plus
        /></el-icon>
      </el-tooltip>
      <div style="margin: 0 10px; cursor: pointer"></div>
      <el-tooltip
        class="box-item"
        effect="dark"
        content="勾选删除"
        placement="top-start"
      >
        <el-icon style="cursor: pointer" @click.stop="emit('remove')"
          ><Minus
        /></el-icon>
      </el-tooltip>
    </div>
  </div>
</template>
<style scoped lang="scss">
.box {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style>
